(function() {
    var b = mobiscroll,
        a = b.$,
        c = b.themes.frame,
        d = {
            minWidth: 76,
            height: 76,
            dateDisplay: 'mmMMddDDyy',
            headerText: false,
            showLabel: false,
            deleteIcon: 'backspace4',
            icon: {
                filled: 'star3',
                empty: 'star'
            },
            btnWidth: false,
            btnCalPrevClass: 'mbsc-ic mbsc-ic-arrow-left2',
            btnCalNextClass: 'mbsc-ic mbsc-ic-arrow-right2',
            btnPlusClass: 'mbsc-ic mbsc-ic-plus',
            btnMinusClass: 'mbsc-ic mbsc-ic-minus',
            onMarkupInserted: function(g, h) {
                var b, d, f, e = a(g.target),
                    c = h.settings;

                function i(b) {
                    return a.isArray(c.readonly) ? c.readonly[b] : c.readonly;
                }
                a('.mbsc-sc-whl', e).on('touchstart mousedown wheel mousewheel', function(c) {
                    if (c.type === 'mousedown' && d || i(a(this).attr('data-index'))) {
                        return;
                    }
                    d = c.type === 'touchstart';
                    b = true;
                    f = a(this).hasClass('mbsc-sc-whl-wpa');
                    a('.mbsc-sc-whl', e).removeClass('mbsc-sc-whl-wpa');
                    a(this).addClass('mbsc-sc-whl-wpa');
                }).on('touchmove mousemove', function() {
                    b = false;
                }).on('touchend mouseup', function(c) {
                    if (b && f && a(c.target).closest('.mbsc-sc-itm').hasClass('mbsc-sc-itm-sel')) {
                        a(this).removeClass('mbsc-sc-whl-wpa');
                    }
                    if (c.type === 'mouseup') {
                        d = false;
                    }
                    b = false;
                });
            },
            onInit: function(c, b) {
                var a = b.buttons;
                a.set.icon = 'checkmark';
                a.cancel.icon = 'close';
                a.clear.icon = 'close';
                if (a.ok) {
                    a.ok.icon = 'checkmark';
                }
                if (a.close) {
                    a.close.icon = 'close';
                }
                if (a.now) {
                    a.now.icon = 'loop2';
                }
                if (a.toggle) {
                    a.toggle.icon = 'play3';
                }
                if (a.start) {
                    a.start.icon = 'play3';
                }
                if (a.stop) {
                    a.stop.icon = 'pause2';
                }
                if (a.reset) {
                    a.reset.icon = 'stop2';
                }
                if (a.lap) {
                    a.lap.icon = 'loop2';
                }
                if (a.hide) {
                    a.hide.icon = 'close';
                }
            }
        };
    c.wp = d;
}());